#pragma once

struct cStackTraceEntry
{
	size_t functionAddress;
	//! Stack pointer.
	size_t rsp;
	//! Value of RSP at the beginning of the function - before any stack allocation.
	size_t rspBeforePrologue;
	//! Instruction pointer.
	size_t rip;
	size_t returnAddress;	
};

#define MAX_STACK_TRACE_SIZE 8
typedef cStackTraceEntry StackTrace[MAX_STACK_TRACE_SIZE];

/*!Walk n frames of the call stack.
   \param  zStackDepth Number of frames to record.
   \param  zStackTrace Structure containing the stack trace.
   \return The number of frames recorded in the stack trace.
*/
int WalkStack(int zStackDepth, StackTrace& zStackTrace); 

